This invention relates to a communication approach.
In a distributed computing system, such as in a distributed memory parallel computer system, messages may be sent from one processor (the sender) to another (the receiver) so that they can work cooperatively to solve a computational problem. The processors are connected, for example, via a communication network. In general, the problem can be solved more quickly if messages can be sent and received more quickly or otherwise transferred in a way that reduces the amount of time processors are idle waiting for messages. Communication via sending and receiving messages is called message passing.
Implementations of message passing systems can face a number of technical constraints which, depending on the implementation, can reduce the efficiency of the system. These technical constraints can include:
1) the sender must make sure that the receiver has memory to receive the message
2) the sender must know where to put the message on the receiver's side
3) memory for the message's send buffer (on the sender's side) and receive buffer (on the receiver's side) must be registered, which can be a costly process.
One approach to addressing the first two constraints involves a rendezvous protocol. In such a protocol, the sender first sends a short “request” message. (The message is short and uses reserved space on the receiver's side.) The receiver responds with a short “reply” message containing the address of the receive buffer after the receiver is ready to receive the message. Finally, the sender sends the actual message. It is desirable to avoid using a rendezvous protocol since the overhead involved in the initial request and reply exchange can render it less efficient than sending a message directly.
To address the third technical constraint, the message passing system can keep track of what send and receive buffers have been registered. Further messages using these buffers do not need to be re-registered, thus saving the memory registration cost. Messages using buffers that have not been registered still need to be registered.
Another approach to addressing the third constraint can be used when the messages are short. The message passing system reserves several send and receive buffers and registers them. A short message is copied into one of these pre-registered buffers and sent to another pre-registered buffer on the receiver's side. The message is then copied to the receiver's actual message destination. The overhead associated with copying the message to its actual destination can render this approach less efficient that transferring the message directly into its actual destination. Therefore, this mechanism is generally most applicable to short messages. The approach can also suffer from the possibility that reserved buffers may run out.